<?php
	session_start();
	include "functions/init_bdd.php";

	$id = $_GET['id'];
	$follower = $_SESSION['id'];
	$date = date("Y-m-d");
	$query = "INSERT INTO followers (followed, follower, date) VALUES ('$id', '$follower', '$date')";
	$result = bdd_query($query);
	if ($result == 1)
		header("Location: zone.php?id=$id");
	else
		header("Location: ../index.php");

?>